/**
 * 用户状态枚举
 */
export enum UserStatus {
  DISABLED = 0, // 禁用
  ENABLED = 1   // 启用
}

/**
 * 角色枚举
 */
export enum UserRole {
  ADMIN = 'ADMIN',           // 管理员
  DEVELOPER = 'DEVELOPER',   // 开发者
  USER = 'USER'              // 普通用户
}

/**
 * 分页查询参数
 */
export interface PageQuery {
  pageNum: number;
  pageSize: number;
}

/**
 * 分页结果
 */
export interface PageResult<T> {
  records: T[];
  total: number;
  size: number;
  current: number;
  pages: number;
}

/**
 * 用户查询参数
 */
export interface UserQueryParams extends PageQuery {
  username?: string;
  nickname?: string;
  status?: UserStatus;
  role?: UserRole;
}

/**
 * 用户实体
 */
export interface User {
  id: number;
  username: string;
  nickname: string;
  avatar: string;
  email: string;
  phone: string;
  status: UserStatus;
  roles: UserRole[];
  createdAt: string;
  updatedAt: string;
  lastLoginAt: string;
}

/**
 * 用户请求参数
 */
export interface UserRequest {
  id?: number;
  username: string;
  password?: string;
  nickname: string;
  avatar?: string;
  email: string;
  phone?: string;
  status: UserStatus;
  roles: UserRole[];
}

/**
 * 修改密码请求参数
 */
export interface ChangePasswordRequest {
  oldPassword: string;
  newPassword: string;
  confirmPassword: string;
}

/**
 * 重置密码请求参数
 */
export interface ResetPasswordRequest {
  userId: number;
  newPassword: string;
}

/**
 * 用户统计信息
 */
export interface UserStats {
  totalUsers: number;
  activeUsers: number;
  newUsersToday: number;
  newUsersThisWeek: number;
  newUsersThisMonth: number;
}

/**
 * 角色实体
 */
export interface Role {
  id: number;
  name: string;
  code: string;
  description: string;
  createdAt: string;
  updatedAt: string;
}

/**
 * 角色请求参数
 */
export interface RoleRequest {
  id?: number;
  name: string;
  code: string;
  description: string;
} 